﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using 紧缩场反射面装调测试系统.ViewModels;

namespace 紧缩场反射面装调测试系统.Views
{
    /// <summary>
    /// DataAcquisition.xaml 的交互逻辑
    /// </summary>
    public partial class DirectionalPatternTest : UserControl
    {
        public static DirectionalPatternTestViewModel ViewModel = new DirectionalPatternTestViewModel();
        public DirectionalPatternTest()
        {
            InitializeComponent();
            this.DataContext = ViewModel;
        }

   

        private void CheckComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if(e.AddedItems.Count > 0)
            {
                foreach(var item in e.AddedItems)
                {
                    ViewModel.AddLine(item.ToString());
                }
            }

            if (e.RemovedItems.Count > 0)
            {
                foreach (var item in e.RemovedItems)
                {
                    ViewModel.RemoveLine(item.ToString());
                }
            }
        }
    }
}
